<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>高级查询采购单信息</title>
</head>
<body>
<script>
    $(function () {
        $("#purchase-save-hlq").linkbutton({onClick:function () {
                var queryParams = $("#purdg").datagrid('options').queryParams;
                queryParams.purtheme=$("#hut-purtheme-hlq").val();
                queryParams.clientId = $("#hut-clientid-hlq").val();
                queryParams.contactId = $("#hut-contactid-hlq").val();
                queryParams.purUserId = $("#hut-user-hlq").val();
                queryParams.startpurdate = $("#hut-startpurdate-hlq").val();
                queryParams.endpurdate = $("#hut-endpurdate-hlq").val();
                queryParams.startpurexcepttime = $("#hut-startpurexcepttime-hlq").val();
                queryParams.endpurexcepttime = $("#hut-endpurexcepttime-hlq").val();
                $("#purdg").datagrid({
                    url:'Purchase-form-hlq-sub',
                    method:'post'
                });
                $("#hlQueryPur").dialog("close");
                $("#purdg").datagrid("reload");
            }});

        $("#Purchase-close-hlq").linkbutton({onClick:function () {
                $("#hlQueryPur").dialog("close");
            }});

        $("#hut-contactid-hlq").combobox({
            onBeforeLoad: function(param){
                if(param == null || param.q == null || param.q.replace(/ /g, '') == ''){
                    var value = $(this).combobox('getValue');
                    if(value){// 修改的时候才会出现q为空而value不为空
                        param.id = value;
                        return true;
                    }
                    return false;
                }

            }});
        $("#hut-clientid-hlq").combobox({
            onBeforeLoad: function(param){
                if(param == null || param.q == null || param.q.replace(/ /g, '') == ''){
                    var value = $(this).combobox('getValue');
                    if(value){// 修改的时候才会出现q为空而value不为空
                        param.id = value;
                        return true;
                    }
                    return false;
                }

            }});
    });
</script>
<div class="form-div" style="width:90%;">
    <form id="Purchase-form-hlq-sub" action="" method="">
        <div class="div-title-hut"> ----------------------------<span class="span-title">采购单信息</span>------------------------------</div>
        <div class="ddn">
            <input id="hut-purtheme-hlq" name="purtheme" class="easyui-textbox" data-options="label:'采购主题',required:false,width:300"><div style="display: inline-block;margin-left: 2%;"></div>
            <input id="hut-clientid-hlq" name="clientId" class="easyui-combobox" data-options="required:false,prompt:'模糊供应商名称',url:'getAllClientBymh',
                label:'供应商(客户)',valueField:'cid',textField:'cname',method:'post',editable:true,panelHeight:'auto',width:300,mode:'remote'" >
        </div>
        <div class="ddn">
            <input id="hut-contactid-hlq" name="contactId" class="easyui-combobox" data-options="required:false,prompt:'输入任意取值',url:'getAllContactBymh',
                label:'供应商联系人',valueField:'contactid',textField:'contactName',method:'post',editable:true,panelHeight:'auto',width:300,mode:'remote'" ><div style="display: inline-block;margin-left: 2%;"></div>
            <select id="hut-user-hlq" class="easyui-combogrid" name="purUserId" style="width:300px;"
                    data-options="
                    label:'经手人',
                    panelWidth:330,
                    prompt:'模糊经手人名称或昵称',
                    required:false,
                    panelHeight:'auto',
                    idField:'handmanId',
                    textField:'handman',
                    mode:'remote',
                    method:'post',
                    url:'findUserBypiny',
                    columns:[[
                        {field:'handmanId',title:'用户编号',width:60},
                        {field:'nickname',title:'用户昵称',width:100},
                        {field:'handman',title:'用户实名',width:100}
                    ]]
                "></select>
        </div>
        <div class="ddn">
            <div style="text-align: left;margin-left: 14%;"><b>采购日期:</b></div>
            <input id="hut-startpurdate-hlq" name="startpurdate" class="easyui-datebox" data-options="label:'起始日期',required:false,width:300"><div style="display: inline-block;margin-left: 2%;"></div>
            <input id="hut-endpurdate-hlq" name="endpurdate" class="easyui-datebox" data-options="label:'结束日期',required:false,width:300">
        </div>
        <div class="ddn">
            <div style="text-align: left;margin-left: 14%;"><b>预计到货日期:</b></div>
            <input id="hut-startpurexcepttime-hlq" name="startpurexcepttime" class="easyui-datebox" data-options="label:'起始日期',required:false,width:300"><div style="display: inline-block;margin-left: 2%;"></div>
            <input id="hut-endpurexcepttime-hlq" name="endpurexcepttime" class="easyui-datebox" data-options="label:'结束日期',required:false,width:300">
        </div>
        <div class="btn" style="text-align: center;margin:50px">
            <a id="purchase-save-hlq" class="easyui-linkbutton " data-options="iconCls:'icon-ok2'">开始查询</a><div style="display: inline-block;margin-left: 3%;"></div>
            <a id="purchase-close-hlq" class="easyui-linkbutton" data-options="iconCls:'icon-cancel2'">取消查询</a>
        </div>
    </form>
</div>
</body>
</html>
